home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
3D World 111
/
3DW_111.iso
/
pc
/
Menu
/
Scenes
/
home.dir
/
00006_Script_Main Button Rollover
< prev
next >
Wrap
Text File
|
2008-09-12
|
4KB
|
164 lines
global rollcolor
global gFullPath
global gRootPath
global gDiv
global finalChan
global gMenuList
global SectionPath
global SectionNumber
property Sp
property myPath
property myListEntry
property myTitle
property myToolTip
on Initialize me, aNumber, aAction, aListEntry, aItemTitle
Sp = sprite(aNumber)
myPath = aAction
myTitle = aItemTitle
myListEntry = aListEntry
myToolTip = ""
case Mypath.char[1] of
"[":
myToolTip = "Click here to go online..."
end case
end
on mouseEnter me
cursor 280
Sp.member = member("main_over", "GFX")
if myTooltip <> "" then
member("tooltip_back").regpoint = point(0,0)
lc = _movie.channel.count
tipLoc = Sp.loc + point(0,30)
channel(lc-1).makescriptedsprite(member("tooltip_back"), tipLoc)
if myToolTip <> "" then
member("tooltip_text").text = myTooltip
else
member("tooltip_text").text = "Click to go online..."
end if
channel(lc).makescriptedsprite(member("tooltip_Text"), (tipLoc + point(5,1)))
sprite(lc).ink = 36
end if
end
on mouseLeave me
sp.member = member("main_button", "gfx")
lc = _movie.channel.count
channel(lc-1).removescriptedsprite()
channel(lc).removescriptedsprite()
cursor -1
Sp.color = rgb(0,0,0)
end
on mouseUp me
repeat with i = finalchan to _movie.channel.count
channel(i).removescriptedsprite()
end repeat
if myPath.char[1] = "<" then
pMarker = myPath.char[2..(myPath.char.count - 1)]
go to marker (pMarker)
else if myPath.char[1] = "[" then
pURL = myPath.char[2..(myPath.char.count - 1)]
gotonetpage(pURL)
else if myPath.char[1] = "{" then
pMovieTarget = myPath.char[2..(myPath.char.count - 1)]
go to movie gRootPath & "menu" & gDiv & "Scenes" & gDiv & pMovieTarget
else if myPath.char[1] = "(" then
pLinkTarget = myPath.char[2..(myPath.char.count - 1)]
theLink = pathReplace(gRootPath & "DiscContent" & gDiv & pLinkTarget)
put theLink
gotonetpage("file:///" & theLink)
else if myPath contains "gallery" then
pMarker = "gallery"
SectionNumber = myListEntry
gFullpath = gRootPath & "DiscContent" & gDiv & gMenuList[myListEntry].itemPath & gDiv
go to marker(pMarker)
else
grabDetails
end if
end
on pathReplace aPath
ret = ""
if the platform contains "mac" then
repeat with i = 1 to aPath.char.count
if aPath.char[i] = ":" then
ret = ret & "/"
else
ret = ret & aPath.char[i]
end if
end repeat
return ret
else
ret = ret & gRootPath.char[1..2]
repeat with i = 3 to aPath.char.count
if aPath.char[i] = ":" then
ret = ret & "/"
else
ret = ret & aPath.char[i]
end if
end repeat
return ret
end if
end
on grabDetails
member("SectionTitle").text = myTitle
pLine = 1
lH = 20
lV = 225
SectionPath = gMenuList[myListEntry].itemPath
SectionNumber = myListEntry
if gMenuList[myListEntry].itemList.count > 0 then
fullPath = gRootPath & "DiscContent" & gDiv & SectionPath & gDiv & (gMenuList[SectionNumber].itemList[1].itemPath) & gDiv
gFullPath = fullPath
generateProductPage(fullPath)
repeat with i = 1 to the number of members of castlib "SubItems"
if member(i, "subItems").name contains myTitle then
channel(finalChan + pLine).removescriptedsprite()
channel(finalChan + pLine).makescriptedsprite(member(i, "subItems"), point(lH,lV))
sprite(finalChan + pLine).scriptInstanceList = []
add(sprite(finalChan + pLine).scriptInstanceList, new(script "Sub_Item_Rollover", 1))
_movie.sendSprite(finalChan + pLine, #Initialize, (finalChan + pLine), pLine)
sprite(finalChan + pLine).ink = 36
lV = lV + 25
pLine = pLine + 1
end if
end repeat
fullPath = gRootPath & "DiscContent" & gDiv & SectionPath & gDiv & (gMenuList[SectionNumber].itemList[1].itemPath) & gDiv
gFullPath = fullPath
go to marker("software")
end if
end